package com.dfbz.springboot_project.mapper;

import com.dfbz.springboot_project.entity.Privilege;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

@org.apache.ibatis.annotations.Mapper
public interface PrivilegeMapper extends Mapper<Privilege> {
    @Select("SELECT " +
            " p.*  " +
            "FROM " +
            " privilege p, " +
            " role_privilege rp  " +
            "WHERE " +
            " p.privilege_id = rp.privilege_id  " +
            " AND rp.role_id =#{Rid}")
    List<Privilege> selectPrivilegesByRid(@Param("Rid") Integer Rid);
}
